package com.jiaomatech.demo.user.feign;

import com.jiaomatech.demo.user.configuration.UserServiceApiConfiguration;
import com.jiaomatech.demo.user.dto.UserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Description: 同步服务API .<br>
 *
 * @author m-xy
 *     Created By 2019/8/5 上午10:12
 */
@FeignClient(
    value = "basic-user-service-demo",
    configuration = UserServiceApiConfiguration.class,
    path = "/user"
)
public interface UserSearchFeign {
    /**
     * 查询用户信息.
     *
     * @param userId
     * @return
     */
    @RequestMapping(value = "/{userId}", method = RequestMethod.GET,
                    produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ResponseEntity<UserDto> findUserById(@PathVariable("userId") String userId);
}
